package com.cskaoyan.controller;

import com.cskaoyan.bean.catalog.CatalogVo;
import com.cskaoyan.bean.category.BaseRespVo;
import com.cskaoyan.service.CatalogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("wx/catalog")
public class CatalogController {
    @Autowired
    CatalogService catalogService;
    @RequestMapping("index")
    public BaseRespVo catalogList(){
        CatalogVo data=catalogService.catalogList();
        return BaseRespVo.ok(data);
    }
    @RequestMapping("current")
    public BaseRespVo currentCatalog(Integer id){
        CatalogVo data=catalogService.currentCatalog(id);
        return BaseRespVo.ok(data);
    }
}
